import { request } from "@/utils/service"
import { SysPermission } from "./type/user"

export const permissionAllApi = () => {
  return request<ApiResponseData<SysPermission[]>>({
    url: "admin/permission/all",
    method: "post",
    data: {
      mode: "all"
    }
  })
}

export const permissionPageApi = (data: PageParams<{}>) => {
  return request<ApiResponseData<PageResult<SysPermission>>>({
    url: "admin/permission/page",
    method: "post",
    data
  })
}
